x=eval(input())
y=eval(input())
a=0
s=0
for i in range(1,y+1):
    a=x*(10**(i-1))+a
    s+=a
print(s)